package com.zl.learning.object.test;

/**
 * Created by zhaolei on 2017/6/11.
 */
public enum  Operation {
    PLUS{
        @Override
        double apply(double x, double y) {
            return  x + y;
        }
    },
    MINUS{
        @Override
        double apply(double x, double y) {
            return x - y;
        }
    }
    ;
    abstract double apply(double x, double y);
}
